using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkAnalystTools._Analysis
{
    /// <summary>
    /// <para>Make Service Area Layer</para>
    /// <para>Makes a service area network analysis layer and sets its analysis properties. A service area analysis layer is useful in determining the area of accessibility within a given cutoff cost from a facility location.</para>
    /// <para>创建服务区网络分析图层并设置其分析属性。服务区分析图层可用于确定设施点位置在给定截止成本内的可达性区域。</para>
    /// </summary>    
    [DisplayName("Make Service Area Layer")]
    public class MakeServiceAreaLayer : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public MakeServiceAreaLayer()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_network_dataset">
        /// <para>Input Analysis Network</para>
        /// <para>The network dataset on which the service area analysis will be performed.</para>
        /// <para>将对其执行服务区分析的网络数据集。</para>
        /// </param>
        /// <param name="_out_network_analysis_layer">
        /// <para>Output Layer Name</para>
        /// <para>Name of the service area network analysis layer to create.</para>
        /// <para>要创建的服务区网络分析图层的名称。</para>
        /// </param>
        /// <param name="_impedance_attribute">
        /// <para>Impedance Attribute</para>
        /// <para>The cost attribute to be used as impedance in the analysis.</para>
        /// <para>在分析中用作阻抗的成本属性。</para>
        /// </param>
        public MakeServiceAreaLayer(object _in_network_dataset, object _out_network_analysis_layer, object _impedance_attribute)
        {
            this._in_network_dataset = _in_network_dataset;
            this._out_network_analysis_layer = _out_network_analysis_layer;
            this._impedance_attribute = _impedance_attribute;
        }
        public override string ToolboxName => "Network Analyst Tools";

        public override string ToolName => "Make Service Area Layer";

        public override string CallName => "na.MakeServiceAreaLayer";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_network_dataset, _out_network_analysis_layer, _impedance_attribute, _travel_from_to.GetGPValue(), _default_break_values, _polygon_type.GetGPValue(), _merge.GetGPValue(), _nesting_type.GetGPValue(), _line_type.GetGPValue(), _overlap.GetGPValue(), _split.GetGPValue(), _excluded_source_name, _accumulate_attribute_name, _UTurn_policy.GetGPValue(), _restriction_attribute_name, _polygon_trim.GetGPValue(), _poly_trim_value, _lines_source_fields.GetGPValue(), _hierarchy.GetGPValue(), _time_of_day, _output_layer];

        /// <summary>
        /// <para>Input Analysis Network</para>
        /// <para>The network dataset on which the service area analysis will be performed.</para>
        /// <para>将对其执行服务区分析的网络数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Analysis Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_network_dataset { get; set; }


        /// <summary>
        /// <para>Output Layer Name</para>
        /// <para>Name of the service area network analysis layer to create.</para>
        /// <para>要创建的服务区网络分析图层的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Layer Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_network_analysis_layer { get; set; }


        /// <summary>
        /// <para>Impedance Attribute</para>
        /// <para>The cost attribute to be used as impedance in the analysis.</para>
        /// <para>在分析中用作阻抗的成本属性。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Impedance Attribute")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _impedance_attribute { get; set; }


        /// <summary>
        /// <para>Travel From or To Facility</para>
        /// <para><xdoc>
        ///   <para>Specifies the direction of travel to or from the facilities.</para>
        ///   <bulletList>
        ///     <bullet_item>Away from Facilities—The service area is created in the direction away from the facilities.</bullet_item><para/>
        ///     <bullet_item>Toward Facilities—The service area is created in the direction towards the facilities.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>Using this option can result in different service areas on a network with one-way restrictions and having different impedances based on direction of travel. The service area for a pizza delivery store, for example, should be created away from the facility, whereas the service area of a hospital should be created toward the facility.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定进出设施点的行进方向。</para>
        ///   <bulletList>
        ///     <bullet_item>远离设施点 - 服务区沿远离设施点的方向创建。</bullet_item><para/>
        ///     <bullet_item>朝向设施点 - 沿朝向设施点的方向创建服务区。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>使用此选项可能会导致网络上具有单向限制的不同服务区域，并且根据行进方向具有不同的阻抗。例如，披萨外卖店的服务区应创建在远离设施的地方，而医院的服务区应朝向设施创建。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Travel From or To Facility")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _travel_from_to_value _travel_from_to { get; set; } = _travel_from_to_value._TRAVEL_FROM;

        public enum _travel_from_to_value
        {
            /// <summary>
            /// <para>Toward Facilities</para>
            /// <para>Toward Facilities—The service area is created in the direction towards the facilities.</para>
            /// <para>朝向设施点 - 沿朝向设施点的方向创建服务区。</para>
            /// </summary>
            [Description("Toward Facilities")]
            [GPEnumValue("TRAVEL_TO")]
            _TRAVEL_TO,

            /// <summary>
            /// <para>Away from Facilities</para>
            /// <para>Away from Facilities—The service area is created in the direction away from the facilities.</para>
            /// <para>远离设施点 - 服务区沿远离设施点的方向创建。</para>
            /// </summary>
            [Description("Away from Facilities")]
            [GPEnumValue("TRAVEL_FROM")]
            _TRAVEL_FROM,

        }

        /// <summary>
        /// <para>Default Break Values</para>
        /// <para><xdoc>
        ///   <para>Default impedance values indicating the extent of the service area to be calculated. The default can be overridden by specifying the break value on the facilities.</para>
        ///   <para>Multiple polygon breaks can be set to create concentric service areas. For instance, to find 2-, 3-, and 5-minute service areas for the same facility, specify "2 3 5" as the value for the Default break values parameter (the numbers 2, 3, and 5 should be separated by a space).</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>默认阻抗值指示要计算的服务区域范围。可以通过指定设施上的中断值来覆盖默认值。</para>
        ///   <para>可以设置多个面分隔点以创建同心服务区。例如，要查找同一设施的 2 分钟、3 分钟和 5 分钟服务区，请指定“2 3 5”作为默认中断值参数的值（数字 2、3 和 5 应用空格分隔）。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Default Break Values")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _default_break_values { get; set; } = null;


        /// <summary>
        /// <para>Polygon Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of polygons to be generated.</para>
        ///   <bulletList>
        ///     <bullet_item>Simple polygons—Creates generalized polygons, which are generated quickly and are fairly accurate, except on the fringes. This is the default.</bullet_item><para/>
        ///     <bullet_item>Detailed polygons—Creates detailed polygons, which accurately model the service area lines and may contain islands of unreached areas. This option is slower than generating generalized polygons.</bullet_item><para/>
        ///     <bullet_item>No polygons—Turns off polygon generation for the case in which only service area lines are desired.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>If your data is of an urban area with a gridlike network, the difference between generalized and detailed polygons would be minimal. However, for mountain and rural roads, the detailed polygons may present significantly more accurate results than generalized polygons.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要生成的多边形的类型。</para>
        ///   <bulletList>
        ///     <bullet_item>简单面 - 创建广义面，这些面的生成速度快且相当准确，但边缘部分除外。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>详细面 - 创建详细面，用于精确建模服务区线，并且可能包含未到达区域的孤岛。此选项比生成广义多边形慢。</bullet_item><para/>
        ///     <bullet_item>无面 - 在仅需要服务区线的情况下关闭面生成。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>如果数据是具有网格状网络的城市区域，则广义面和详细面之间的差异将很小。但是，对于山区和农村道路，详细面可能比广义面提供更准确的结果。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Polygon Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _polygon_type_value _polygon_type { get; set; } = _polygon_type_value._SIMPLE_POLYS;

        public enum _polygon_type_value
        {
            /// <summary>
            /// <para>Simple polygons</para>
            /// <para>Simple polygons—Creates generalized polygons, which are generated quickly and are fairly accurate, except on the fringes. This is the default.</para>
            /// <para>简单面 - 创建广义面，这些面的生成速度快且相当准确，但边缘部分除外。这是默认设置。</para>
            /// </summary>
            [Description("Simple polygons")]
            [GPEnumValue("SIMPLE_POLYS")]
            _SIMPLE_POLYS,

            /// <summary>
            /// <para>Detailed polygons</para>
            /// <para>Detailed polygons—Creates detailed polygons, which accurately model the service area lines and may contain islands of unreached areas. This option is slower than generating generalized polygons.</para>
            /// <para>详细面 - 创建详细面，用于精确建模服务区线，并且可能包含未到达区域的孤岛。此选项比生成广义多边形慢。</para>
            /// </summary>
            [Description("Detailed polygons")]
            [GPEnumValue("DETAILED_POLYS")]
            _DETAILED_POLYS,

            /// <summary>
            /// <para>No polygons</para>
            /// <para>No polygons—Turns off polygon generation for the case in which only service area lines are desired.</para>
            /// <para>无面 - 在仅需要服务区线的情况下关闭面生成。</para>
            /// </summary>
            [Description("No polygons")]
            [GPEnumValue("NO_POLYS")]
            _NO_POLYS,

        }

        /// <summary>
        /// <para>Merge Polygons with Similar Ranges</para>
        /// <para><xdoc>
        ///   <para>Specifies the options to merge polygons that share similar break values. This option is applicable only when generating polygons for multiple facilities.</para>
        ///   <bulletList>
        ///     <bullet_item>Overlap—Creates individual polygons for each facility. The polygons can overlap each other.</bullet_item><para/>
        ///     <bullet_item>Split—Creates individual polygons that are closest for each facility. The polygons do not overlap each other.</bullet_item><para/>
        ///     <bullet_item>Dissolve— Joins the polygons of multiple facilities that have the same break value.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定用于合并具有相似中断值的面的选项。此选项仅在为多个设施点生成面时适用。</para>
        ///   <bulletList>
        ///     <bullet_item>重叠 （Overlap） - 为每个设施点创建单独的面。多边形可以相互重叠。</bullet_item><para/>
        ///     <bullet_item>分割 （Split） - 创建与每个设施点最接近的单个面。多边形不会相互重叠。</bullet_item><para/>
        ///     <bullet_item>溶解 （Dissolve） - 连接具有相同中断值的多个设施点的面。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Merge Polygons with Similar Ranges")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _merge_value _merge { get; set; } = _merge_value._NO_MERGE;

        public enum _merge_value
        {
            /// <summary>
            /// <para>Overlap</para>
            /// <para>Overlap—Creates individual polygons for each facility. The polygons can overlap each other.</para>
            /// <para>重叠 （Overlap） - 为每个设施点创建单独的面。多边形可以相互重叠。</para>
            /// </summary>
            [Description("Overlap")]
            [GPEnumValue("NO_MERGE")]
            _NO_MERGE,

            /// <summary>
            /// <para>Split</para>
            /// <para>Split—Creates individual polygons that are closest for each facility. The polygons do not overlap each other.</para>
            /// <para>分割 （Split） - 创建与每个设施点最接近的单个面。多边形不会相互重叠。</para>
            /// </summary>
            [Description("Split")]
            [GPEnumValue("NO_OVERLAP")]
            _NO_OVERLAP,

            /// <summary>
            /// <para>Dissolve</para>
            /// <para>Dissolve— Joins the polygons of multiple facilities that have the same break value.</para>
            /// <para>溶解 （Dissolve） - 连接具有相同中断值的多个设施点的面。</para>
            /// </summary>
            [Description("Dissolve")]
            [GPEnumValue("MERGE")]
            _MERGE,

        }

        /// <summary>
        /// <para>Polygon Nest Option</para>
        /// <para><xdoc>
        ///   <para>Specifies the option to create concentric service area polygons as disks or rings. This option is applicable only when multiple break values are specified for the facilities.</para>
        ///   <bulletList>
        ///     <bullet_item>Rings—Do not include the area of the smaller breaks. This creates polygons going between consecutive breaks. Use this option if you want to find the area from one break to another.</bullet_item><para/>
        ///     <bullet_item>Disks— Creates the polygons going from the facility to the break. For instance, If you create 5- and 10-minute service areas, then the 10-minute service area polygon will include the area under the 5-minute service area polygon. Use this option if you want to find the entire area from the facility to the break for each break.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将同心服务区面创建为圆盘或环的选项。仅当为设施点指定了多个中断值时，此选项才适用。</para>
        ///   <bulletList>
        ///     <bullet_item>环 （Rings） - 不包括较小断点的区域。这将创建在连续中断之间移动的多边形。如果要查找从一个中断到另一个中断的区域，请使用此选项。</bullet_item><para/>
        ///     <bullet_item>圆盘 （Disks） - 创建从设施点到断点的面。例如，如果创建 5 分钟和 10 分钟服务区，则 10 分钟服务区面将包括 5 分钟服务区面下的区域。如果要查找从设施到每个休息点的整个区域，请使用此选项。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Polygon Nest Option")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _nesting_type_value _nesting_type { get; set; } = _nesting_type_value._RINGS;

        public enum _nesting_type_value
        {
            /// <summary>
            /// <para>Rings</para>
            /// <para>Rings—Do not include the area of the smaller breaks. This creates polygons going between consecutive breaks. Use this option if you want to find the area from one break to another.</para>
            /// <para>环 （Rings） - 不包括较小断点的区域。这将创建在连续中断之间移动的多边形。如果要查找从一个中断到另一个中断的区域，请使用此选项。</para>
            /// </summary>
            [Description("Rings")]
            [GPEnumValue("RINGS")]
            _RINGS,

            /// <summary>
            /// <para>Disks</para>
            /// <para>Disks— Creates the polygons going from the facility to the break. For instance, If you create 5- and 10-minute service areas, then the 10-minute service area polygon will include the area under the 5-minute service area polygon. Use this option if you want to find the entire area from the facility to the break for each break.</para>
            /// <para>圆盘 （Disks） - 创建从设施点到断点的面。例如，如果创建 5 分钟和 10 分钟服务区，则 10 分钟服务区面将包括 5 分钟服务区面下的区域。如果要查找从设施到每个休息点的整个区域，请使用此选项。</para>
            /// </summary>
            [Description("Disks")]
            [GPEnumValue("DISKS")]
            _DISKS,

        }

        /// <summary>
        /// <para>Line Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of lines to be generated based on the service area analysis. Selecting the True Lines or True lines with measures option for large service areas will increase the amount of memory consumed by the analysis.</para>
        ///   <bulletList>
        ///     <bullet_item>No lines—Do not generate lines. This is the default.</bullet_item><para/>
        ///     <bullet_item>True lines—Lines are generated without measures.</bullet_item><para/>
        ///     <bullet_item>True lines with measures—Lines are generated with measures. The measure values are generated based on the impedance value on each end of the edge with the intermediate vertices interpolated. Do not use this option if faster performance is desired.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要根据服务区分析生成的线的类型。为大型服务区域选择“真实线”或“带测量值的真线”选项将增加分析消耗的内存量。</para>
        ///   <bulletList>
        ///     <bullet_item>无线 （No lines） - 不生成线。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>真实线 - 生成不带测量值的线。</bullet_item><para/>
        ///     <bullet_item>带度量值的真线 - 使用度量生成的线。测量值是根据边两端的阻抗值生成的，中间顶点插值。如果需要更快的性能，请不要使用此选项。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Line Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _line_type_value _line_type { get; set; } = _line_type_value._NO_LINES;

        public enum _line_type_value
        {
            /// <summary>
            /// <para>No lines</para>
            /// <para>No lines—Do not generate lines. This is the default.</para>
            /// <para>无线 （No lines） - 不生成线。这是默认设置。</para>
            /// </summary>
            [Description("No lines")]
            [GPEnumValue("NO_LINES")]
            _NO_LINES,

            /// <summary>
            /// <para>True lines</para>
            /// <para>True lines—Lines are generated without measures.</para>
            /// <para>真实线 - 生成不带测量值的线。</para>
            /// </summary>
            [Description("True lines")]
            [GPEnumValue("TRUE_LINES")]
            _TRUE_LINES,

            /// <summary>
            /// <para>True lines with measures</para>
            /// <para>True lines with measures—Lines are generated with measures. The measure values are generated based on the impedance value on each end of the edge with the intermediate vertices interpolated. Do not use this option if faster performance is desired.</para>
            /// <para>带度量值的真线 - 使用度量生成的线。测量值是根据边两端的阻抗值生成的，中间顶点插值。如果需要更快的性能，请不要使用此选项。</para>
            /// </summary>
            [Description("True lines with measures")]
            [GPEnumValue("TRUE_LINES_WITH_MEASURES")]
            _TRUE_LINES_WITH_MEASURES,

        }

        /// <summary>
        /// <para>Overlap Lines</para>
        /// <para><xdoc>
        ///   <para>Determines whether overlapping lines are generated when the service area lines are computed.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Include a separate line feature for each facility when the facilities have service area lines that are coincident.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Include each service area line at most once and associate it with its closest (least impedance) facility.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定在计算服务区线时是否生成重叠线。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 当设施点的服务区线重合时，为每个设施点提供单独的线要素。</bullet_item><para/>
        ///     <bullet_item>未选中 - 最多包括每条服务区线路一次，并将其与其最近（最小阻抗）设施点相关联。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Overlap Lines")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _overlap_value _overlap { get; set; } = _overlap_value._true;

        public enum _overlap_value
        {
            /// <summary>
            /// <para>OVERLAP</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("OVERLAP")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NON_OVERLAP</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NON_OVERLAP")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Split Lines when They Cross a Service Area Break</para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>Checked—Split every line between two breaks into two lines, each lying within its break. This is useful if you want to symbolize the service area lines by break. Otherwise, leave this option unchecked for optimal performance.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The lines are not split at the boundaries of the breaks. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>选中 （Checked） - 将两个分隔符之间的每行分成两行，每行位于其分隔符内。如果要按中断符号化服务区线，这将非常有用。否则，请取消选中此选项以获得最佳性能。</bullet_item><para/>
        ///     <bullet_item>未选中 （Unchecked） - 线不会在断点的边界处分割。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Split Lines when They Cross a Service Area Break")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _split_value _split { get; set; } = _split_value._true;

        public enum _split_value
        {
            /// <summary>
            /// <para>SPLIT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SPLIT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_SPLIT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_SPLIT")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Exclude Sources from Polygon Generation</para>
        /// <para><xdoc>
        ///   <para>Specifies the list of network sources to be excluded when generating the polygons. The geometry of traversed elements from the excluded sources will be omitted from all polygons.</para>
        ///   <para>This is useful if you have some network sources that you don't want to be included in the polygon generation because they create less accurate polygons or are inconsequential for the service area analysis. For example, while creating a drive time service area in a multimodal network of streets and rails, you should choose to exclude the rail lines from polygon generation so as to correctly model where a vehicle could travel.</para>
        ///   <para>Excluding a network source from service area polygons does not prevent those sources from being traversed. Excluding sources from service area polygons only influences the polygon shape of the service areas. If you want to prevent traversal of a given network source, you must create an appropriate restriction when defining your network dataset.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定生成多边形时要排除的网络源列表。从所有面中将省略来自排除源的遍历元素的几何图形。</para>
        ///   <para>如果您不希望将某些网络源包含在面生成中，因为它们创建的面精度较低或对服务区分析无关紧要，这将非常有用。例如，在街道和铁路的多式联运网络中创建行驶时间服务区时，应选择从面生成中排除铁路线，以便正确建模车辆的行驶位置。</para>
        ///   <para>从服务区面中排除网络源不会阻止遍历这些源。从服务区面中排除源只会影响服务区的面形状。如果要防止遍历给定网络源，则必须在定义网络数据集时创建适当的限制。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Exclude Sources from Polygon Generation")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _excluded_source_name { get; set; } = null;


        /// <summary>
        /// <para>Accumulators</para>
        /// <para><xdoc>
        ///   <para>A list of cost attributes to be accumulated during analysis. These accumulation attributes are for reference only; the solver only uses the cost attribute specified by the Impedance Attribute parameter to calculate the route.</para>
        ///   <para>For each cost attribute that is accumulated, a Total_[Impedance] property is added to the routes that are output by the solver.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>在分析期间要累积的成本属性列表。这些累积属性仅供参考;求解器仅使用阻抗属性参数指定的成本属性来计算路由。</para>
        ///   <para>对于累积的每个成本属性，都会将 Total_[Impedance] 属性添加到求解器输出的路径中。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Accumulators")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _accumulate_attribute_name { get; set; } = null;


        /// <summary>
        /// <para>U-Turn Policy</para>
        /// <para><xdoc>
        ///   <para>Specifies the U-turn policy that will be used at junctions. Allowing U-turns implies that the solver can turn around at a junction and double back on the same street. Given that junctions represent street intersections and dead ends, different vehicles may be able to turn around at some junctions but not at others—it depends on whether the junction represents an intersection or a dead end. To accommodate this, the U-turn policy parameter is implicitly specified by the number of edges that connect to the junction, which is known as junction valency. The acceptable values for this parameter are listed below; each is followed by a description of its meaning in terms of junction valency.</para>
        ///   <bulletList>
        ///     <bullet_item>Allowed—U-turns are permitted at junctions with any number of connected edges. This is the default value.</bullet_item><para/>
        ///     <bullet_item>Not allowed—U-turns are prohibited at all junctions, regardless of junction valency. However, U-turns are still permitted at network locations even when this setting is chosen, but you can set the individual network location's CurbApproach property to prohibit U-turns there as well.</bullet_item><para/>
        ///     <bullet_item>Allowed at dead ends only—U-turns are prohibited at all junctions, except those that have only one adjacent edge (a dead end).</bullet_item><para/>
        ///     <bullet_item>Allowed at dead ends and intersections only—U-turns are prohibited at junctions where exactly two adjacent edges meet but are permitted at intersections (junctions with three or more adjacent edges) and dead ends (junctions with exactly one adjacent edge). Often, networks have extraneous junctions in the middle of road segments. This option prevents vehicles from making U-turns at these locations.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>If you need a more precisely defined U-turn policy, consider adding a global turn delay evaluator to a network cost attribute or adjusting its settings if one exists, and pay particular attention to the configuration of reverse turns. You can also set the CurbApproach property of your network locations.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将在交汇点使用的 U 形转弯策略。允许掉头意味着求解器可以在交叉路口掉头，并在同一条街道上折返。鉴于交叉路口代表街道交叉路口和死胡同，不同的车辆可能在某些交叉路口掉头，但在其他交叉路口则不能掉头——这取决于交叉路口是代表交叉路口还是死胡同。为了适应这种情况，U 形转弯策略参数由连接到交汇点的边数隐式指定，这称为交汇点化合价。下面列出了此参数的可接受值;每个之后都描述了其在结化合价方面的含义。</para>
        ///   <bulletList>
        ///     <bullet_item>允许 - 允许在具有任意数量连接边的交汇处进行 U 形转弯。这是默认值。</bullet_item><para/>
        ///     <bullet_item>不允许 - 无论交汇点化合价如何，所有交汇点都禁止掉头。但是，即使选择此设置，仍允许在网络位置掉头，但您可以设置单个网络位置的 CurbApproach 属性以禁止掉头。</bullet_item><para/>
        ///     <bullet_item>仅允许在死胡同处 - 所有交汇点都禁止掉头，但只有一个相邻边（死胡同）的交汇点除外。</bullet_item><para/>
        ///     <bullet_item>仅允许在死角和交叉点处 - 在两条相邻边恰好相交的交汇处禁止掉头，但在交叉点（具有三个或更多相邻边的交汇点）和死端（恰好具有一条相邻边的交汇点）允许掉头。通常，网络在路段中间有无关的交叉路口。此选项可防止车辆在这些位置掉头。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>如果需要更精确地定义掉头策略，请考虑将全局转弯延迟评估器添加到网络成本属性或调整其设置（如果存在），并特别注意倒车转弯的配置。还可以设置网络位置的 CurbApproach 属性。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("U-Turn Policy")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _UTurn_policy_value _UTurn_policy { get; set; } = _UTurn_policy_value._ALLOW_UTURNS;

        public enum _UTurn_policy_value
        {
            /// <summary>
            /// <para>Allowed</para>
            /// <para>Allowed—U-turns are permitted at junctions with any number of connected edges. This is the default value.</para>
            /// <para>允许 - 允许在具有任意数量连接边的交汇处进行 U 形转弯。这是默认值。</para>
            /// </summary>
            [Description("Allowed")]
            [GPEnumValue("ALLOW_UTURNS")]
            _ALLOW_UTURNS,

            /// <summary>
            /// <para>Not allowed</para>
            /// <para>Not allowed—U-turns are prohibited at all junctions, regardless of junction valency. However, U-turns are still permitted at network locations even when this setting is chosen, but you can set the individual network location's CurbApproach property to prohibit U-turns there as well.</para>
            /// <para>不允许 - 无论交汇点化合价如何，所有交汇点都禁止掉头。但是，即使选择此设置，仍允许在网络位置掉头，但您可以设置单个网络位置的 CurbApproach 属性以禁止掉头。</para>
            /// </summary>
            [Description("Not allowed")]
            [GPEnumValue("NO_UTURNS")]
            _NO_UTURNS,

            /// <summary>
            /// <para>Allowed at dead ends only</para>
            /// <para>Allowed at dead ends only—U-turns are prohibited at all junctions, except those that have only one adjacent edge (a dead end).</para>
            /// <para>仅允许在死胡同处 - 所有交汇点都禁止掉头，但只有一个相邻边（死胡同）的交汇点除外。</para>
            /// </summary>
            [Description("Allowed at dead ends only")]
            [GPEnumValue("ALLOW_DEAD_ENDS_ONLY")]
            _ALLOW_DEAD_ENDS_ONLY,

            /// <summary>
            /// <para>Allowed at dead ends and intersections only</para>
            /// <para>Allowed at dead ends and intersections only—U-turns are prohibited at junctions where exactly two adjacent edges meet but are permitted at intersections (junctions with three or more adjacent edges) and dead ends (junctions with exactly one adjacent edge). Often, networks have extraneous junctions in the middle of road segments. This option prevents vehicles from making U-turns at these locations.</para>
            /// <para>仅允许在死角和交叉点处 - 在两条相邻边恰好相交的交汇处禁止掉头，但在交叉点（具有三个或更多相邻边的交汇点）和死端（恰好具有一条相邻边的交汇点）允许掉头。通常，网络在路段中间有无关的交叉路口。此选项可防止车辆在这些位置掉头。</para>
            /// </summary>
            [Description("Allowed at dead ends and intersections only")]
            [GPEnumValue("ALLOW_DEAD_ENDS_AND_INTERSECTIONS_ONLY")]
            _ALLOW_DEAD_ENDS_AND_INTERSECTIONS_ONLY,

        }

        /// <summary>
        /// <para>Restrictions</para>
        /// <para>A list of restriction attributes to be applied during the analysis.</para>
        /// <para>在分析期间要应用的限制属性列表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Restrictions")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _restriction_attribute_name { get; set; } = null;


        /// <summary>
        /// <para>Trim Polygons</para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>Checked—Trims the polygons containing the edges at the periphery of the service area to be within the specified distance of these outer edges. This is useful if the network is very sparse and you don't want the service area to cover large areas where there are no features.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Do not trim polygons.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>选中 （Checked） - 修剪包含服务区外围边的面，使其位于这些外边的指定距离内。如果网络非常稀疏，并且您不希望服务区域覆盖没有要素的大面积区域，这将非常有用。</bullet_item><para/>
        ///     <bullet_item>未选中 （Unchecked） - 不修剪面。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Trim Polygons")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _polygon_trim_value _polygon_trim { get; set; } = _polygon_trim_value._true;

        public enum _polygon_trim_value
        {
            /// <summary>
            /// <para>TRIM_POLYS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("TRIM_POLYS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_TRIM_POLYS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_TRIM_POLYS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Polygon Trim</para>
        /// <para>Specifies the distance within which the service area polygons are trimmed. The parameter includes a value and units for the distance. The default value is 100 meters.</para>
        /// <para>指定服务区面修剪的距离。该参数包括距离的值和单位。默认值为 100 米。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Polygon Trim")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string _poly_trim_value { get; set; } = "100 Meters";


        /// <summary>
        /// <para>Include Network Source Fields in Lines</para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>Checked—Add the SourceID, SourceOID, FromPosition, and ToPosition fields to the service area lines to hold information about the underlying source features traversed during the analysis. This can be useful to join the results of the service area lines to the original source data.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Do not add the source fields (SourceID, SourceOID, FromPosition, and ToPosition) to the service area lines.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将 SourceID、SourceOID、FromPosition 和 ToPosition 字段添加到服务区线，以保存有关分析期间遍历的基础源要素的信息。这对于将服务区线的结果联接到原始源数据非常有用。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不将源字段（SourceID、SourceOID、FromPosition 和 ToPosition）添加到服务区行。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Include Network Source Fields in Lines")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _lines_source_fields_value _lines_source_fields { get; set; } = _lines_source_fields_value._true;

        public enum _lines_source_fields_value
        {
            /// <summary>
            /// <para>LINES_SOURCE_FIELDS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("LINES_SOURCE_FIELDS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_LINES_SOURCE_FIELDS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_LINES_SOURCE_FIELDS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Use Hierarchy in Analysis</para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>Checked—The hierarchy attribute will be used for the analysis. Using a hierarchy results in the solver preferring higher-order edges to lower-order edges. Hierarchical solves are faster, and they can be used to simulate the preference of a driver who chooses to travel on freeways rather than local roads when possible—even if that means a longer trip. This option is active only if the input network dataset has a hierarchy attribute.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The hierarchy attribute will not be used for the analysis. If hierarchy is not used, the result is a service area measured along all edges of the network dataset regardless of hierarchy level.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>The parameter is inactive if a hierarchy attribute is not defined on the network dataset used to perform the analysis.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>选中 - 层次结构属性将用于分析。使用层次结构会导致求解器优先选择高阶边而不是低阶边。分层求解速度更快，并且可用于模拟驾驶员的偏好，如果可能的话，他们选择在高速公路上行驶而不是在本地道路上行驶，即使这意味着更长的行程。仅当输入网络数据集具有层次结构属性时，此选项才处于活动状态。</bullet_item><para/>
        ///     <bullet_item>未选中 - 等级属性将不用于分析。如果不使用层次结构，则无论层次结构级别如何，结果都是沿网络数据集的所有边测量的服务区域。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>如果未在用于执行分析的网络数据集上定义层次结构属性，则该参数处于非活动状态。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Use Hierarchy in Analysis")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _hierarchy_value _hierarchy { get; set; } = _hierarchy_value._false;

        public enum _hierarchy_value
        {
            /// <summary>
            /// <para>USE_HIERARCHY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("USE_HIERARCHY")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_HIERARCHY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_HIERARCHY")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Time of Day</para>
        /// <para><xdoc>
        ///   <para>The time to depart from or arrive at the facilities of the service area layer. The interpretation of this value as a depart or arrive time depends on whether travel is away from or toward the facilities.
        ///   <bulletList>
        ///     <bullet_item>It represents the departure time if Travel From or To Facility is set to TRAVEL_FROM.  </bullet_item><para/>
        ///     <bullet_item>It represents the arrival time if Travel From or To Facility is set to TRAVEL_TO.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        ///   <para>If you have chosen a traffic-based impedance attribute, the solution will be generated given dynamic traffic conditions at the time of day specified here. A date and time can be specified as 5/14/2012 10:30 AM.</para>
        ///   <para>Instead of using a particular date, a day of the week can be specified using the following dates:
        ///   <bulletList>
        ///     <bullet_item>Today—12/30/1899  </bullet_item><para/>
        ///     <bullet_item>Sunday—12/31/1899  </bullet_item><para/>
        ///     <bullet_item>Monday—1/1/1900  </bullet_item><para/>
        ///     <bullet_item>Tuesday—1/2/1900  </bullet_item><para/>
        ///     <bullet_item>Wednesday—1/3/1900  </bullet_item><para/>
        ///     <bullet_item>Thursday—1/4/1900  </bullet_item><para/>
        ///     <bullet_item>Friday—1/5/1900  </bullet_item><para/>
        ///     <bullet_item>Saturday—1/6/1900  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        ///   <para>Repeatedly solving the same analysis, but using different Time of Day values, allows you to see how a facility's reach changes over time. For instance, the five-minute service area around a fire station may start out large in the early morning, diminish during the morning rush hour, grow in the late morning, and so on throughout the day.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>出发或到达服务区图层的设施点的时间。将此值解释为出发或到达时间取决于旅行是离开还是朝向设施点。
        ///   <bulletList>
        ///     <bullet_item>如果“出发”或“前往设施”设置为“TRAVEL_FROM”，则表示出发时间。</bullet_item><para/>
        ///     <bullet_item>如果“从”或“到设施点”设置为“TRAVEL_TO”，则表示到达时间。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        ///   <para>如果选择了基于流量的阻抗属性，则将在此处指定的一天中的时间根据动态流量条件生成解决方案。日期和时间可以指定为 2012 年 5 月 14 日上午 10：30。</para>
        /// 可以使用<para>以下日期指定星期几，而不是使用特定日期：
        ///   <bulletList>
        ///     <bullet_item>今天 - 1899 年 12 月 30 日</bullet_item><para/>
        ///     <bullet_item>星期日—1899年12月31日</bullet_item><para/>
        ///     <bullet_item>星期一 - 1/1/1900</bullet_item><para/>
        ///     <bullet_item>星期二 - 1/2/1900</bullet_item><para/>
        ///     <bullet_item>星期三 - 1/3/1900</bullet_item><para/>
        ///     <bullet_item>星期四—1/4/1900</bullet_item><para/>
        ///     <bullet_item>星期五 - 1/5/1900</bullet_item><para/>
        ///     <bullet_item>星期六 - 1/6/1900</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        ///   <para>通过重复求解相同的分析，但使用不同的时间值，您可以查看设施的覆盖范围如何随时间变化。例如，消防站周围的五分钟服务区可能在清晨开始时很大，在早高峰时段逐渐减少，在上午晚些时候增加，以此类推。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time of Day")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_of_day { get; set; } = null;


        /// <summary>
        /// <para>Network Analyst Layer</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Network Analyst Layer")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_layer { get; set; }


        public MakeServiceAreaLayer SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}